﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SearchUser.aspx.cs" Inherits="Task.SearchUser" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <base target="_parent" />
    <link href="css/style.css" rel="stylesheet" rev="stylesheet" />
    <link href="css/global.css" rel="stylesheet" rev="stylesheet" />
    <script type="text/javascript" src="script/jquery-1.7.1.min.js"></script>
    <script type="text/javascript" src="script/jquery-ui-1.8.17.custom.min.js"></script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table border="0" cellpadding="0" cellspacing="0" class="listTable1">
            <tr>
                <td colspan="5">
                    <h3>
                        <strong>查询受托人</strong></h3>
                    <hr />
                </td>
            </tr>
            <tr>
                <td style="text-align: right">
                    用户名
                </td>
                <td>
                    <input type="text" class="inputboder1" id="txtUserName" runat="server" />
                </td>
                <td style="text-align: right">
                    用户编号
                </td>
                <td>
                    <input type="text" id="txtUserCode" class="inputboder1" runat="server" />
                </td>
                <td>
                    <asp:Button ID="btnSearch" runat="server" Text="查询" CssClass="btnBg" OnClick="btnSearch_Click" />
                </td>
            </tr>
        </table>
        <table border="0" cellpadding="0" id="tableUserList" cellspacing="0" class="listTable3">
            <tr>
                <th style="width: 5px">
                    <!--<input name="" type="radio" value="" />-->
                </th>
                <th>
                    员工编号
                </th>
                <th>
                    员工中文名
                </th>
                <th>
                    员工英文名
                </th>
            </tr>
            <asp:Repeater ID="rptUserList" runat="server">
                <ItemTemplate>
                    <tr>
                        <td>
                            <input type="radio" id="cboUser" runat="server" />
                            <asp:HiddenField runat="server" ID="hidUserID" Value='<%#Eval("USER_ID") %>' />
                            <asp:HiddenField runat="server" ID="hidUserName" Value='<%#Eval("CN_NAME") %>' />
                        </td>
                        <td>
                            <%#Eval("USER_CODE")%>
                        </td>
                        <td>
                            <%#Eval("CN_NAME")%>
                        </td>
                        <td>
                            <%#Eval("EN_NAME")%>
                        </td>
                    </tr>
                </ItemTemplate>
            </asp:Repeater>
            <tr>
                <td>
                    <asp:Button ID="btnChoose" runat="server" Text="选择" CssClass="btnBg" 
                        onclick="btnChoose_Click" />
                </td>
                <td colspan="3">
                    <webdiyer:AspNetPager ID="pagination" runat="server" Width="100%" meta:resourcekey="pagination"
                        CssClass="aspNetPager" CustomInfoTextAlign="Left" HorizontalAlign="Right" NextPageText="下一页"
                        PrevPageText="上一页" FirstPageText="首页" LastPageText="末页" OnPageChanging="pagination_PageChanging"
                        PageIndexBoxType="DropDownList" ShowCustomInfoSection="Left" NavigationToolTipTextFormatString='{0}'
                        NumericButtonTextFormatString="{0}">
                    </webdiyer:AspNetPager>
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
<script type="text/javascript">
    function ChooseOnlyOneRadio(parentPanel) {
        $("#" + parentPanel + " [type=radio]").bind("click", function () {
            var obj = this;
            $("#" + parentPanel + " [type=radio]:checked").each(function (index) {
                if (obj.id != this.id) {
                    $("#" + this.id).attr("checked", false); // = false;
                }
            });
        });
    }
    $(document).ready(function () {
        ChooseOnlyOneRadio("tableUserList");
    });
 

</script>
